package com.kili.cloud.shorturl.service.impl;

import com.kili.cloud.common.exception.CommonErrorCode;
import com.kili.cloud.common.exception.ExceptionUtils;
import com.kili.cloud.shorturl.service.AbstractShortUrl;
import com.kili.cloud.shorturl.vo.ShortUrlParam;
import com.kili.common.Exception.ErrorCode;
import com.kili.common.Exception.ExceptionType;
import com.kili.common.Exception.KiliBaseException;
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

/**
 * @description: 试用型短链接服务提供类
 * @author: tom.liu
 * @date: 2019/6/17 10:23
 */
@Component
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public class SimpleShortUrl extends AbstractShortUrl {
    @Override
    public void validateInput(ShortUrlParam param) {
        //TODO 试用版长链接转短链接验证方法实现
        throw ExceptionUtils.getBussinessException(ExceptionType.BIZ_ERROR, "500", "Not yet open. Please look forward to it" );
    }

    @Override
    public void validateVisit(String uri, String ip) {
        //TODO 试用版短链接访问方法实现
        throw ExceptionUtils.getBussinessException(ExceptionType.BIZ_ERROR, "500", "Not yet open. Please look forward to it" );
    }

    @Override
    public String inputBussiness(ShortUrlParam param) {
        return null;
    }

    @Override
    public String visitBussiness(String uri) {
        return null;
    }
}
